﻿<UserControl x:Class="Big3.Hitbase.RecordMedium.MP3SettingsUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mscor="clr-namespace:System;assembly=mscorlib" 
             mc:Ignorable="d" Width="350" Height="450" MinWidth="350" MaxWidth="350" MinHeight="450" MaxHeight="450">
    <UserControl.Resources>
        <x:Array Type="{x:Type mscor:UInt32}" x:Key="MP3BitRateArray">
            <mscor:UInt32>32</mscor:UInt32>
            <mscor:UInt32>40</mscor:UInt32>
            <mscor:UInt32>48</mscor:UInt32>
            <mscor:UInt32>56</mscor:UInt32>
            <mscor:UInt32>64</mscor:UInt32>
            <mscor:UInt32>80</mscor:UInt32>
            <mscor:UInt32>96</mscor:UInt32>
            <mscor:UInt32>112</mscor:UInt32>
            <mscor:UInt32>128</mscor:UInt32>
            <mscor:UInt32>160</mscor:UInt32>
            <mscor:UInt32>192</mscor:UInt32>
            <mscor:UInt32>224</mscor:UInt32>
            <mscor:UInt32>256</mscor:UInt32>
            <mscor:UInt32>320</mscor:UInt32>
        </x:Array>

    </UserControl.Resources>
    <Grid Margin="10" Height="415" Width="327">
        <Grid.RowDefinitions>
            <RowDefinition Height="60" />
            <RowDefinition Height="60" />
            <RowDefinition Height="250" />
            <RowDefinition Height="30" />
            <RowDefinition Height="5*" />
        </Grid.RowDefinitions>
        <Grid.Resources>
            <Style TargetType="{x:Type ToggleButton}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ToggleButton}">
                            <Grid x:Name="mainGrid" Margin="1,1,1,1">
                                <Grid x:Name="uncheckedState">
                                    <Border Margin="0,0,0,0" BorderBrush="BlanchedAlmond" BorderThickness="2,2,2,2" CornerRadius="4,4,4,4">
                                        <ContentControl HorizontalAlignment="Center" VerticalAlignment="Center"></ContentControl>
                                        <Border.Background>
                                            <LinearGradientBrush EndPoint="0.504,1.5" StartPoint="0.504,0.03">
                                                <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                                <GradientStop Color="#FFFFFFFF" Offset="0.567"/>
                                            </LinearGradientBrush>
                                        </Border.Background>
                                    </Border>
                                </Grid>
                                <Grid x:Name="checkedState" Visibility="Collapsed" >
                                    <Border Margin="0,0,0,0" BorderBrush="BlanchedAlmond" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4">
                                        <ContentControl HorizontalAlignment="Center" VerticalAlignment="Center"></ContentControl>
                                        <!--ContentControl HorizontalAlignment="Center" VerticalAlignment="Center">Sampler √</ContentControl-->
                                        <Border.Background>
                                            <LinearGradientBrush EndPoint="0.504,1.5" StartPoint="0.504,0.03">
                                                <GradientStop Color="#FFFFC934" Offset="0"/>
                                                <GradientStop Color="#FFFFFFFF" Offset="0.567"/>
                                            </LinearGradientBrush>
                                        </Border.Background>
                                    </Border>
                                </Grid>
                                <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" />
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Cursor" Value="Hand"></Setter>
                                </Trigger>
                                <Trigger Property="IsChecked" Value="True">
                                    <Setter TargetName="checkedState" Property="Visibility" Value="Visible" />
                                    <Setter TargetName="uncheckedState" Property="Visibility" Value="Collapsed" />
                                    <Setter Property="Effect">
                                        <Setter.Value>
                                            <DropShadowEffect ShadowDepth="0" Color="Orange" BlurRadius="10" />
                                        </Setter.Value>
                                    </Setter>

                                    <!--Setter TargetName="mainGrid" Property="Margin" Value="2,2,0,0"/-->
                                    <!--Setter TargetName="checkedState" Property="Background" Value="Blue" /-->
                                    <!--Setter TargetName="uncheckedState" Property="Background" Value="Red" /-->
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Grid.Resources>
        <ToggleButton Content="Variable Bitrate" Name="toggleButtonVBR" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,15,0,0" Width="148" Height="25" Grid.Row="2" Checked="toggleButtonVBR_Checked" Unchecked="toggleButtonVBR_Unchecked" Click="toggleButtonVBR_Click"></ToggleButton>
        <Button Content="Abbrechen" HorizontalAlignment="Right" Name="buttonCancel" VerticalAlignment="Bottom" Width="75" Click="buttonCancel_Click" Grid.Row="3" Margin="0,0,4,0" />
        <Button Content="OK" HorizontalAlignment="Right" Margin="0,0,86,0" Name="buttonOK" VerticalAlignment="Bottom" Width="75" Click="buttonOK_Click" Grid.Row="3" />
        <Button Content="Standard" HorizontalAlignment="Left" Margin="5,0,0,0" Name="buttonDefault" VerticalAlignment="Bottom" Width="89" Grid.Row="3" Click="buttonDefault_Click" />
        <Grid Margin="5,5,0,0"  VerticalAlignment="Top" Name="gridGeneric">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto" />

            </Grid.RowDefinitions>
            <TextBlock HorizontalAlignment="Left" Margin="5,10,0,10" Name="textBlock9" Text="Kanäle:" VerticalAlignment="Center" />
            <ComboBox Grid.Row ="1" Grid.Column="1" HorizontalAlignment="Left" Margin="5,10,0,10" Name="comboBoxChannels" VerticalAlignment="Center" Width="100">
                <ComboBoxItem Content="Stereo" IsSelected="True" />
                <ComboBoxItem Content="Joint-Stereo" />
            </ComboBox>
        </Grid>
        <Border BorderBrush="Silver" BorderThickness="1" Height="1" Width="308" HorizontalAlignment="Left" Margin="10,5,0,0" Name="border1" VerticalAlignment="Top" Grid.Row="2"></Border>
        <Grid Margin="5,45,0,0"  VerticalAlignment="Top" Name="gridVBR" Grid.Row="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="206*" />
                <ColumnDefinition Width="116*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
            </Grid.RowDefinitions>
            <ComboBox Margin="0,5" VerticalAlignment="Center" HorizontalAlignment="Left" Name="comboBoxVBRMethod" Width="100" SelectionChanged="comboBoxVBRMethod_SelectionChanged" Grid.Column="1">
                <ComboBoxItem Content="Standard" IsSelected="True" />
                <ComboBoxItem Content="ABR" />
            </ComboBox>
            <ComboBox Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,5" Name="comboBoxVBRAverage" Width="100" ItemsSource="{Binding Source={StaticResource MP3BitRateArray}}" Grid.Column="1" />
            <ComboBox Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,5" Name="comboBoxVBRMin" Width="100" ItemsSource="{Binding Source={StaticResource MP3BitRateArray}}" Grid.Column="1" />
            <ComboBox Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,5" Name="comboBoxVBRMax" Width="100" ItemsSource="{Binding Source={StaticResource MP3BitRateArray}}" Grid.Column="1" />
            <TextBlock HorizontalAlignment="Left" Margin="5,0,0,0" Name="textBlock6" Text="VBR Methode:" VerticalAlignment="Center" />
            <TextBlock HorizontalAlignment="Left" Margin="5,0,0,0" Name="textBlockVBRBit" Text="Durchschnittliche Bitrate(KBit/Sek.):" VerticalAlignment="Center" Grid.Row="1" />
            <TextBlock HorizontalAlignment="Left" Margin="5,0,0,0" Name="textBlock5" Text="Minimale Bitrate(KBit/Sek.):" VerticalAlignment="Center" Grid.Row="2" />
            <TextBlock HorizontalAlignment="Left" Margin="5,0,0,0" Name="textBlock7" Text="Maximale Bitrate(KBit/Sek.):" VerticalAlignment="Center" Grid.Row="3" />
            <Slider Grid.Row="4"  Height="29" HorizontalAlignment="Left" IsDirectionReversed="False" IsSelectionRangeEnabled="False" IsSnapToTickEnabled="True" LargeChange="0" Margin="5,35,0,0" Maximum="9" Name="sliderVBRQuality" TickPlacement="BottomRight" VerticalAlignment="Top" Width="200" Value="7" />
            <TextBlock Height="23" Grid.Row="4" HorizontalAlignment="Left" Margin="5,15,0,0" Name="textBlockVBR1" Text="VBR Qualität:" VerticalAlignment="Top" Width="100" />
            <TextBlock Height="23" Grid.Row="4" HorizontalAlignment="Left" Margin="5,60,0,0" Name="textBlockVBR2" Text="Min" VerticalAlignment="Top" />
            <TextBlock Grid.Row="4" HorizontalAlignment="Left" Margin="184,60,0,7" Name="textBlockVBR3" Text="Max" VerticalAlignment="Center" />
        </Grid>
        <Border BorderBrush="Silver" BorderThickness="1" Height="1" Width="308" HorizontalAlignment="Left" Margin="10,55,0,0" Name="border2" VerticalAlignment="Top"></Border>
        <ToggleButton Grid.Row="1" Content="Feste Bitrate" Name="toggleButtonCBR" VerticalAlignment ="Top" HorizontalAlignment="Left" Height="23" Margin="5,5,0,0" Width="148" Checked="toggleButtonCBR_Checked" Unchecked="toggleButtonCBR_Unchecked" />
        <Grid Margin="5,32,0,0"  VerticalAlignment="Top" Name="gridCBR" Grid.Row="1" Grid.RowSpan="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
            </Grid.RowDefinitions>
            
            <ComboBox Grid.Column="1" HorizontalAlignment="Left" Margin="0,5,0,5" Name="comboBoxCBRBitrates" Width="100" IsEditable="False" IsReadOnly="True" ItemsSource="{Binding Source={StaticResource MP3BitRateArray}}" Grid.Row="1" />
            <TextBlock HorizontalAlignment="Left" Margin="5,0,0,0" Name="textBlock1" Text="Bitrate(KBit/Sek.):" VerticalAlignment="Center" Width="100" Grid.Row="1" />
        </Grid>
        

    </Grid>
</UserControl>
